    <%@ include file="../common.jsp" %>
<!-- <script type="text/javascript">
	$(document).ready(function(){
		$("#uploadNewDocForm").attr("action",'<c:out value="${flowExecutionUrl}"></c:out>');
		});
</script>
<table>
 -->
<c:forEach items="${docAttributesList}" var="docAttribute" varStatus="status" step="2">
	<tr>
		<td class="spacingColumnWidthLess"></td>
		<td class="formLabel"><label>${docAttributesList[status.index].dmaName}</label></td>
		<td class="spacingColumnWidthLess"></td>
		<td class="formField">
			<c:choose>
				<c:when test="${docAttribute.dmaLength gt 200}">
					<form:textarea path="docDetailsForm.metaDataAttrList[${status.index}].metaDataAttrValue" cols="20" rows="${docAttribute.dmaLength/1000}"/>
				</c:when>
				<c:otherwise>
					<form:input path="docDetailsForm.metaDataAttrList[${status.index}].metaDataAttrValue" />
				</c:otherwise>
			</c:choose>
			<form:hidden path="docDetailsForm.metaDataAttrList[${status.index}].metaDataAttrId" value="${docAttributesList[status.index].dmaId}"/>
			<form:hidden path="docDetailsForm.metaDataAttrList[${status.index}].dmaValueId" value="${docDetailsForm.metaDataAttrList[status.index].dmaValueId}"/>
		</td>
		<td class="spacingColumnWidthMedium"></td>
	<c:if test="${(status.index + 1) lt fn:length(docAttributesList)}">
		<td class="formLabel">
			<label>${docAttributesList[status.index + 1].dmaName}</label>
		</td>
		<td class="spacingColumnWidthLess"></td>
		<td>
			<c:choose>
				<c:when test="${docAttribute.dmaLength gt 200}">
					<form:textarea path="docDetailsForm.metaDataAttrList[${status.index + 1}].metaDataAttrValue" cols="20" rows="${docAttribute.dmaLength/1000}"/>		
							</c:when>
				<c:otherwise>
					<form:input path="docDetailsForm.metaDataAttrList[${status.index + 1}].metaDataAttrValue" />
				</c:otherwise>
			</c:choose>
			<form:hidden path="docDetailsForm.metaDataAttrList[${status.index + 1}].metaDataAttrId" value="${docAttributesList[status.index + 1].dmaId}"/>
			<form:hidden path="docDetailsForm.metaDataAttrList[${status.index + 1}].dmaValueId" value="${docDetailsForm.metaDataAttrList[status.index + 1].dmaValueId}"/>
		</td>
		<td class="spacingColumnWidthLess"></td>
	</c:if>	
	</tr>
	<tr>
		<td class="spacingColumnWidthLess"></td>
		<td></td>
		<td class="spacingColumnWidthLess"></td>
		<td >
			<form:errors path="docDetailsForm.metaDataAttrList[${status.index}].metaDataAttrValue" cssClass="text errorMsg"></form:errors>
		</td>
		<td class="spacingColumnWidthMedium"></td>
	<c:if test="${(status.index + 1) lt fn:length(docAttributesList)}">
		<td></td>
		<td class="spacingColumnWidthLess"></td>
		<td >
			<form:errors  path="docDetailsForm.metaDataAttrList[${status.index + 1}].metaDataAttrValue" cssClass="text errorMsg"></form:errors>
		</td>
		<td class="spacingColumnWidthLess"></td>
	</c:if>	
	</tr>
	<tr class="formSpacingRow formBlockColor"><td colspan="9"></td></tr>
</c:forEach>
<!-- </table> -->
